package skiree.host.abetsy.config;

import org.springframework.web.util.ContentCachingRequestWrapper;

public class RequestContext {
    private static final ThreadLocal<ContentCachingRequestWrapper> requestHolder = new ThreadLocal<>();

    public static void setRequest(ContentCachingRequestWrapper request) {
        requestHolder.set(request);
    }

    public static ContentCachingRequestWrapper getRequest() {
        return requestHolder.get();
    }

    public static void clear() {
        requestHolder.remove();
    }
}